package com.qingcheng.service.seckill;

import com.qingcheng.pojo.seckill.SeckillOrder;
import com.qingcheng.pojo.seckill.SeckillStatus;

/**
 * Created by yuanxin
 * Date:2019/7/23
 * Time:19:20
 */
public interface SeckillOrderService {
    /**
     *  添加秒杀订单
     * @param id
     * @param time
     * @param username
     * @return
     */
    Boolean add(Long id,String time,String username);

    /**
     * 抢单状态查询
     * @param username
     * @return
     */
    SeckillStatus queryStatus(String username);

    /**
     * 更新订单状态
     * @param outTradeNo
     * @param transactionId
     * @param username
     */
    void updatePayStatus(String outTradeNo, String transactionId,String username);

    /** 根据用户名查询用户秒杀订单信息
     * @param username
     * @return
     */
    SeckillOrder findById(String username);
}
